Telegram Group & Telegram Channel
🧠 Как клонировать голос с помощью Open Source (Coqui TTS)

Хочешь, чтобы ИИ говорил твоим голосом? Без подписок, платных API и ограничений? Вот подробная инструкция, как клонировать свой голос с нуля с помощью open-source инструментов:

🔧 Установка


sudo apt install ffmpeg
pip install TTS soundfile torchaudio gradio

git clone https://github.com/coqui-ai/TTS.git
cd TTS
pip install -e .

🎙️ 1. Подготовка записи голоса

Тебе нужен файл .wav:
- продолжительность: от 1 минуты
- формат: моно, 16 кГц, 16-bit

Пример конвертации:

ffmpeg -i input.mp3 -ac 1 -ar 16000 output.wav


🧬 2. Генерация эмбеддинга твоего голоса


from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts

config = XttsConfig()
model = Xtts.init_from_config(config)
model.load_checkpoint("tts_models/multilingual/multi-dataset/xtts_v2")

voice_sample = "your_voice.wav"
speaker_embedding = model.get_speaker_embedding(voice_sample)

📤 3. Генерация речи с твоим голосом


text = "Привет! Я теперь могу говорить твоим голосом."
wav = model.tts(text, speaker_embedding=speaker_embedding)
model.save_wav(wav, "output.wav")


💻 4. (Опционально) Интерфейс с Gradio


import gradio as gr

def speak(text):
wav = model.tts(text, speaker_embedding=speaker_embedding)
path = "generated.wav"
model.save_wav(wav, path)
return path

gr.Interface(fn=speak, inputs=gr.Textbox(), outputs=gr.Audio()).launch()


Быстрый способ (через CLI)


tts --model_name "tts_models/multilingual/multi-dataset/xtts_v2" \
--text "Привет, мир!" \
--speaker_wav path/to/your.wav \
--out_path output.wav


⚠️ Важно


- 💻 Работает на CPU, но лучше с GPU.
- 🌐 Поддерживает русский язык.



@Python_Community_ru



tg-me.com/Python_Community_ru/2609
Create:
Last Update:

🧠 Как клонировать голос с помощью Open Source (Coqui TTS)

Хочешь, чтобы ИИ говорил твоим голосом? Без подписок, платных API и ограничений? Вот подробная инструкция, как клонировать свой голос с нуля с помощью open-source инструментов:

🔧 Установка


sudo apt install ffmpeg
pip install TTS soundfile torchaudio gradio

git clone https://github.com/coqui-ai/TTS.git
cd TTS
pip install -e .

🎙️ 1. Подготовка записи голоса

Тебе нужен файл .wav:
- продолжительность: от 1 минуты
- формат: моно, 16 кГц, 16-bit

Пример конвертации:

ffmpeg -i input.mp3 -ac 1 -ar 16000 output.wav


🧬 2. Генерация эмбеддинга твоего голоса


from TTS.tts.configs.xtts_config import XttsConfig
from TTS.tts.models.xtts import Xtts

config = XttsConfig()
model = Xtts.init_from_config(config)
model.load_checkpoint("tts_models/multilingual/multi-dataset/xtts_v2")

voice_sample = "your_voice.wav"
speaker_embedding = model.get_speaker_embedding(voice_sample)

📤 3. Генерация речи с твоим голосом


text = "Привет! Я теперь могу говорить твоим голосом."
wav = model.tts(text, speaker_embedding=speaker_embedding)
model.save_wav(wav, "output.wav")


💻 4. (Опционально) Интерфейс с Gradio


import gradio as gr

def speak(text):
wav = model.tts(text, speaker_embedding=speaker_embedding)
path = "generated.wav"
model.save_wav(wav, path)
return path

gr.Interface(fn=speak, inputs=gr.Textbox(), outputs=gr.Audio()).launch()


Быстрый способ (через CLI)


tts --model_name "tts_models/multilingual/multi-dataset/xtts_v2" \
--text "Привет, мир!" \
--speaker_wav path/to/your.wav \
--out_path output.wav


⚠️ Важно


- 💻 Работает на CPU, но лучше с GPU.
- 🌐 Поддерживает русский язык.



@Python_Community_ru

BY Python Community




Share with your friend now:
tg-me.com/Python_Community_ru/2609

View MORE
Open in Telegram


Python Community Telegram | DID YOU KNOW?

Date: |

Telegram has exploded as a hub for cybercriminals looking to buy, sell and share stolen data and hacking tools, new research shows, as the messaging app emerges as an alternative to the dark web.An investigation by cyber intelligence group Cyberint, together with the Financial Times, found a ballooning network of hackers sharing data leaks on the popular messaging platform, sometimes in channels with tens of thousands of subscribers, lured by its ease of use and light-touch moderation.

Export WhatsApp stickers to Telegram on iPhone

You can’t. What you can do, though, is use WhatsApp’s and Telegram’s web platforms to transfer stickers. It’s easy, but might take a while.Open WhatsApp in your browser, find a sticker you like in a chat, and right-click on it to save it as an image. The file won’t be a picture, though—it’s a webpage and will have a .webp extension. Don’t be scared, this is the way. Repeat this step to save as many stickers as you want.Then, open Telegram in your browser and go into your Saved messages chat. Just as you’d share a file with a friend, click the Share file button on the bottom left of the chat window (it looks like a dog-eared paper), and select the .webp files you downloaded. Click Open and you’ll see your stickers in your Saved messages chat. This is now your sticker depository. To use them, forward them as you would a message from one chat to the other: by clicking or long-pressing on the sticker, and then choosing Forward.

Python Community from de


Telegram Python Community
FROM USA